set more off


** required files to run the codes (all files in the "data" folder): 
* households_9319_PE_r.dta - main household wealth file
* inheritance95_13.dta - bequest event file
* lnr_mlnr_flnr_updated2013.dta - family link file
* deaths19612016.dta - death event file
* housing_transactions.dta - housing transaction event file
* borett_transactions.dta - cooperative housing unit transaction event file
* cpi_1960_2020_USD.dta - cpi data adjusted to USD - constructed from cpi.csv and nokusd.csv
* prices.dta (generated in code "1 - prices.do")
* kappa.dta (generated in code "2run - kappa.do")
* 
* the following files must be in the "programs" folder (or otherwise added to the path of Stata)
* gen_transactions.ado 
* gen_welfare.ado



********************************************************************************
* general definitions of folders

global MicroDataPath /ssb/stamme01/wealth5/FGGHMN_Asset_Price_Redistribution
global programs ${MicroDataPath}/programs
global output ${MicroDataPath}/output
global data ${MicroDataPath}/data

********************************************************************************
* PREPARING DATA (P = prepare -- these files produce no results)

do $programs/P_clean_bequest_data.do
do $programs/P_copy_data.do
do $programs/P_inheritance_events.do
do $programs/P_final_Data.do


********************************************************************************
* RESULT FILES -- these files produce csvs used to make graphs etc

do $programs/year_cohort_files.do
do $programs/aggregate_housing_transactions.do 
do $programs/summary_statistics.do
do $programs/welfare_histograms.do
do $programs/incomplete_markets.do 
do $programs/interest_rate_and_ltv.do


